<%@page import="cn.sendto.dbhelper.DBHelper"%>
<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>
<%
	request.setCharacterEncoding("utf-8");
	String name = request.getParameter("coursename");
	String sql = "insert into courseinfo (coursename) values (?)";
	DBHelper helper = new DBHelper();
	
	
	int i = helper.executeInsert(sql, name);
	if(i>0){
		request.setAttribute("message", "添加成功");
		
	}else{
		request.setAttribute("message", "添加失败");
		
	}
	request.getRequestDispatcher("course_list.jsp").forward(request, response);
	helper.close();



%>